import request from '@/utils/request'

// 简历模板相关接口

// 获取简历模板列表
export const getResumeTemplates = () => {
  return request.get('/resume-templates')
}

// 获取简历模板详情
export const getResumeTemplateDetail = (id: number) => {
  return request.get(`/resume-templates/${id}`)
}

// 下载简历模板
export const downloadResumeTemplate = (id: number) => {
  return request.post(`/resume-templates/${id}/download`)
}

// 简历模板类型定义
export interface ResumeTemplate {
  id: number
  name: string
  description: string
  previewImageUrl: string
  category: string
  downloadCount: number
  createTime: string
  updateTime: string
  color: string
  isPremium?: boolean
}

// 下载响应类型
export interface DownloadResponse {
  success: boolean
  message: string
  downloadUrl?: string
}
